home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Global Const CURRVERSION$ = "ION FORMAT VERSION: 1.0"
- Global Const LFile$ = "GraphicLibs.Dat"
- Global Const SFile$ = "GraphicLibs.Dat"
- Type GFXLIB
- LibName As String
- GraphicsFile As String
- End Type
- Global GraphixLibs(100) As GFXLIB
- Global MaxLibs As Integer
- Sub LoadFile()
- Open LFile$ For Input As #1
- LNum = 0
- Do
- Line Input #1, a$
- If a$ = "[ENDOFFILE]" Then Exit Do
- If a$ = "[GRAPHICSLIBRARYDEF]" Then
- LNum = LNum + 1
- Line Input #1, a$
- GraphixLibs(LNum).LibName = Right$(a$, Len(a$) - 13)
- Line Input #1, a$
- GraphixLibs(LNum).GraphicsFile = Right$(a$, Len(a$) - 6)
- Line Input #1, a$
- fval$ = Right$(a$, Len(a$) - 8)
- End If
- Loop
- Close #1
- MaxLibs = LNum
- End Sub
- Sub SaveFile()
- Open SFile$ For Output As #1
- Print #1, CURRVERSION$
- For i = 1 To MaxLibs
- Print #1, "[GRAPHICSLIBRARYDEF]"
- Print #1, "LibraryName: " & GraphixLibs(i).LibName
- Print #1, "File: " & GraphixLibs(i).GraphicsFile
- Print #1, "[ENDGRAPHICSLIBRARYDEF]"
- Next i
- Print #1, "[ENDOFFILE]"
- Close #1
- End Sub
- Sub UpdateView()
- currselect = Form1.List1.ListIndex
- Form1.List1.Clear
- Form1.List1.AddItem "[NewLib]"
- For i = 1 To MaxLibs
- Form1.List1.AddItem GraphixLibs(i).LibName
- Next i
- Form1.List1.ListIndex = currselect
- If Form1.List1.ListIndex <> 0 Then
- Form1.Text1.Text = GraphixLibs(Form1.List1.ListIndex).LibName
- Form1.Text2.Text = GraphixLibs(Form1.List1.ListIndex).GraphicsFile
- End If
- End Sub
-